// C++ author 清晨与猫鱼
#include <iostream>
#include <string>
#include "Realize.h"

using namespace std;

int main(const int argc, const char** argv)
{	
    // 商业服务对象
    BusinessDelegate* businessDelegate = new BusinessDelegate;
    // 设置成EJB类型
    businessDelegate->setServiceType("EJB");

    // 客户端
    Client client(businessDelegate);

    client.doTask();        // 运行任务

    cout << "\n\n";
    
    // 设置成JMS服务
    businessDelegate->setServiceType("JMS");

    client.doTask();        // 运行任务
}